﻿@{
    Layout = "~/Views/Shared/LS/_Layout.cshtml";
    ViewBag.Nav = "Index";
    ViewBag.Title = "首页";

    var key = Request["page"] ?? "rd";
    var catalogId = Request["catalogId"] ?? "967d9a8c-5912-4edc-95c1-fe8536748eb1";

    Article qph = null;
    if (!string.IsNullOrEmpty(Request["tthId"]))
    {
        var tthId = ConvertHelper.ToGuid(Request["tthId"]);
        qph = IoCHeler.Resolve<IArticleAppService>().GetArticle(tthId);
    }

}

<div class="contentLeft">
    <!--轮播图修改1012-->
    @*<div class="section-focus-pic" id="section-focus-pic" style="">
            <div class="swiper-container" style="overflow:visible;">
                <ul class="swiper-wrapper">
                    <li class="item swiper-slide" style="left:0px;">
                        <a href="detail.html?id=4" target="_blank">
                            <img src="http://cools.qctt.cn/1510102935387?imageView2/1/w/2000/h/1000" width="570" height="300">
                        </a>
                    </li>
                    <li class="item swiper-slide">
                        <a href="detail.html?id=5" target="_blank">
                            <img src="http://cools.qctt.cn/1509946849742?imageView2/1/w/2000/h/1000" width="570" height="300">
                        </a>
                    </li>
                </ul>
            </div>
            <div class="swiper-pagination"></div>
        </div>*@

    @if (qph == null)
    {
        <div class="section-focus-pic" id="section-focus-pic" style="">
            <div class="swiper-container" style="overflow:visible;">
                <ul class="swiper-wrapper">
                    @Html.Action("Read", "Articles", new { catalogId = "", area = "cms", Top = 10, VPartial = "ReadForBrand", CatalogKey = string.Format("gg_{0}", key) })
                </ul>
            </div>
            <div class="swiper-pagination"></div>
        </div>
    }



    <div class='@( (Request["page"] == "sp" || Request["page"] == "live") ? "video-list" : "article-list")'>
        @if (Request["type"] == "catalog")
        {
            @Html.Action("ReadForParenForWeb", "Catalogs", new { Top = 20, ParentKey = "xzt", VPartial = "ReadForParent", IncludeChild = false, OrderBy = "PublishTime Desc" })
        }
        else
        {
            if (qph != null)
            {
                @Html.Action("Read", "Articles", new { area = "cms", Top = 20, VPartial = "ReadForNews", Origin = qph.Id })
            }
            else
            {
                @Html.Action("Read", "Articles", new { area = "cms", Top = 20, VPartial = "ReadForNews", catalogId = catalogId })
            }
        }
        @*@if (key == "Home")
                {
                    @Html.Action("ReadForSearch", "Articles", new { Top = 20, VPartial = "ReadForNews", IncludeChild = false, OrderBy = "PublishTime Desc" })
                }
                else if(Request["page"]=="xzt"){
            @Html.Action("ReadForParent", "Catalogs", new { Top = 20, ParentKey="xzt", IncludeChild = false, OrderBy = "PublishTime Desc" })
                }
                else
                {
                    @Html.Action("ReadForCatalog", "Articles", new { Top = 20, VPartial = "ReadForNews", CatalogKey = key, IncludeChild = false, OrderBy = "PublishTime Desc" })
                }*@

    </div>
    @if (Request["page"] != "xzt")
    {
        <a href="#" class="btn-more">
            查看更多
        </a>
    }

</div>

@if (Request["page"] != "xzt" && qph == null)
{
    <div class="contentRight" style="margin-top:30px">
        <div class="conR_up">
            <p>热门资讯</p>
            @Html.Action("Read", "Articles", new { catalogId = catalogId, area = "cms", Top = 6, VPartial = "ReadForRedNews", OrderBy = "ViewCount Desc" })
            @*@if (key == "Home")
                {
                @Html.Action("ReadForSearch", "Articles", new { Top = 6, VPartial = "ReadForRedNews", IncludeChild = false, OrderBy = "ViewCount Desc" })
                }
                else
                {
                @Html.Action("ReadForCatalog", "Articles", new { Top = 6, VPartial = "ReadForRedNews", CatalogKey = key, IncludeChild = false, OrderBy = "ViewCount Desc" })
                }*@
        </div>
    </div>
}

@if (qph != null)
{
    <div class="contentRight" style="margin-top:30px">
        <div class="qph-wrap">
            <div class="qph-avatar">
                <img src="@qph.ImageUrl" alt="">
            </div>

            <div class="qph-til">
                @qph.Title
            </div>

            <div class="qph-info">
                @qph.Summary
            </div>
        </div>


    </div>
}


<div class="adlist_hide" style="display:none">
</div>
<!--ad start-->
<!--ad end-->
